package com.ruoyi.yuce.service.impl;

import java.util.List;

import com.ruoyi.yuce.domain.pojo.CoBuJian;
import com.ruoyi.yuce.domain.pojo.CoBuJianLeiXing;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yuce.mapper.FengjiMapper;
import com.ruoyi.yuce.domain.Fengji;
import com.ruoyi.yuce.service.IFengjiService;

/**
 * 风机Service业务层处理
 *
 * @author ruoyi
 * @date 2023-01-17
 */
@Service
public class FengjiServiceImpl implements IFengjiService
{
    @Autowired
    private FengjiMapper fengjiMapper;

    /**
     * 查询风机
     *
     * @param id 风机主键
     * @return 风机
     */
    @Override
    public Fengji selectFengjiById(Integer id)
    {
        return fengjiMapper.selectFengjiById(id);
    }

    /**
     * 查询风机列表
     *
     * @param fengji 风机
     * @return 风机
     */
    @Override
    public List<Fengji> selectFengjiList(Fengji fengji)
    {
        return fengjiMapper.selectFengjiList(fengji);
    }

    /**
     * 新增风机
     *
     * @param fengji 风机
     * @return 结果
     */
    @Override
    public int insertFengji(Fengji fengji)
    {
        return fengjiMapper.insertFengji(fengji);
    }

    /**
     * 修改风机
     *
     * @param fengji 风机
     * @return 结果
     */
    @Override
    public int updateFengji(Fengji fengji)
    {
        return fengjiMapper.updateFengji(fengji);
    }

    /**
     * 批量删除风机
     *
     * @param ids 需要删除的风机主键
     * @return 结果
     */
    @Override
    public int deleteFengjiByIds(Integer[] ids)
    {
        return fengjiMapper.deleteFengjiByIds(ids);
    }

    /**
     * 删除风机信息
     *
     * @param id 风机主键
     * @return 结果
     */
    @Override
    public int deleteFengjiById(Integer id)
    {
        return fengjiMapper.deleteFengjiById(id);
    }


    @Override
    public List<CoBuJian> getBuJian1(int czid) {
        return fengjiMapper.getBuJianName1(czid);
    }

    @Override
    public List<CoBuJian> getBuJian() {
        return fengjiMapper.getBuJianName();
    }

    public int getFengjiNum(){
        return fengjiMapper.getFengjiNum();
    }
}
